package com.bing.entity;

import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;

/**
 * Created by kaibb on 15-11-2.
 */

@Entity
public class Person {

    @EmbeddedId
    @AttributeOverride(name = "firstName", column = @Column(name = "fname"))
     private UserId userId;

    private int age;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public UserId getUserId() {
        return userId;
    }

    public void setUserId(UserId userId) {
        this.userId = userId;
    }
}
